<template>
    <div>修改图片路径</div>
    <img :src="url" />
</template>

<script setup>
import {ref} from "vue"
let url= ref(new URL("../assets/img1.png",import.meta.url).href);
setTimeout(()=>{
    url.value= new URL("../assets/img2.png",import.meta.url).href;
}, 5000);
</script>

<style>

</style>